//
//  BaseViewController.m
//  tuanGG
//
//  Created by 微他 on 15/9/16.
//  Copyright (c) 2015年 weita. All rights reserved.
//

#import "BaseViewController.h"
#import "TabBarController.h"
#import "Header.h"
#import "DataStatisticsController.h"
#import "AccountCenterController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (instancetype)init
{
    self = [super init];
    if (self) {
        
        UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] init];
        temporaryBarButtonItem.title = @"";
        self.navigationItem.backBarButtonItem = temporaryBarButtonItem;
        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"wode_no_selected"] style:UIBarButtonItemStylePlain target:self action:@selector(navButton:)];
        
        
        
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];

}
//导航栏标题
-(void)addnavigationTitle:(NSString *)titleinfo navColor:(NSString *)string{
    UILabel *title=[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, 30)];
    [title setTextColor:[UIColor whiteColor]];
    [title setText:titleinfo];
    title.font = [UIFont boldSystemFontOfSize:18];
    UIColor *color = [UIColor colorWithHexString:string];
    self.navigationController.navigationBar.translucent = NO;
    self.navigationController.navigationBar.barTintColor =color;
    self.navigationItem.titleView=title;
}



- (void)tabBarHidden {
    TabBarController *tabBar= (TabBarController *)self.tabBarController;
    [tabBar hidTabBar];
}
- (void)tabBarShow {
    TabBarController *tabBar= (TabBarController *)self.tabBarController;
    [tabBar showTabBar];
}
- (void)navButton:(UIButton *)sender {

AccountCenterController *AccountCenterVC = [[AccountCenterController alloc]init];
    [self.navigationController pushViewController:AccountCenterVC animated:YES];
}

//提示框
-(void)addAlert:(NSString *)string{
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:string delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
    [alert show];
}
@end
